<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateFeishuCallingCardsUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('feishu_calling_card_users', function (Blueprint $table) {
            $table->id();
            $table->string('openid', 32)->default('')->comment('微信用户 openid');
            $table->unsignedBigInteger('invitorId')->default(0)->comment('feishu_calling_cards主键');
            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->index(['openid'], 'openid');
            $table->comment = '加盟商名片微信小程序用户表';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('feishu_calling_card_users');
    }
}
